home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_11_05
/
1105082b
< prev
next >
Wrap
Text File
|
1993-03-14
|
648b
|
36 lines
// fv1.h - a dynamic vector of float (with a possibly
// non-zero low-bound) using a subscripting object
// implemented by inheritance from float_array
#include "fa1.h"
class float_vector : public float_array
{
public:
float_vector(int lo = 0, int hi = 0);
float operator[](int i) const;
fa_index operator[](int i);
int low() const;
int high() const;
private:
int _low;
};
inline float_vector::float_vector(int lo, int hi)
: _low(lo), float_array(hi - lo + 1)
{ }
inline int float_vector::low() const
{
return _low;
}
inline int float_vector::high() const
{
return _low + length() - 1;
}